﻿@inject IDataCacheService _dataCacheService


@if (string.IsNullOrWhiteSpace(Url))
{
    <div>
        <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="@Icon" IconString="@IconString"/>
        <span>@((MarkupString)$"{Title}{(string.IsNullOrWhiteSpace(Title) ? "" : "：")}{Text}")</span>
    </div>
}
else
{

    <span class="@(Class+" d-flex label-large")" style="word-break: break-all; align-items: center;">
        <CnGalWebSite.Shared.MasaComponent.Shared.Components.MasaIcon Type="@Icon" IconString="@IconString"/>
        <span>
            @($"{Title}{(string.IsNullOrWhiteSpace(Title) ? "" : "：")}{Text}")
            <a href="@Url" target="_blank">@Url</a>
        </span>
    </span>
}


@code {
    [Parameter]
    public string Title { get; set; }
    [Parameter]
    public string Text { get; set; }
    [Parameter]
    public string Class { get; set; }
    [Parameter]
    public string Url { get; set; }
    [Parameter]
    public IconType Icon { get; set; }
    [Parameter]
    public string IconString { get; set; }
    [Parameter]
    public string Content { get; set; }
}
